package com.yohann.boot.entity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;

/**
 * @author Yeung Wah
 * @since 2022/2/17
 */
@Data
@Document(indexName = "test_elasticsearch")
public class TestElasticsearch {
    @Id
    private String id;
    private String title;
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String content;
    private Integer userId;
    private Date createTime;
}